package cn.tedu.online.examination.system.test;

import javax.swing.*;
import java.awt.*;

/**
 * @author JokerQ
 * @date 2020/6/10 - 16:25
 */
public class LayoutDemo {
    public static void main(String[] args) {
        JFrame frame  = new JFrame("布局管理演示");
        JPanel content = new JPanel(new BorderLayout());
        JPanel tools = new JPanel(new BorderLayout());
        JPanel right = new JPanel(new FlowLayout());
        JButton ok = new JButton("OK");
        JButton cancel = new JButton("Cancel");

        frame.add(content);
        content.add(BorderLayout.SOUTH,tools);
        tools.add(BorderLayout.EAST,right);
        right.add(ok);
        right.add(cancel);
        frame.setSize(600,400);
        frame.setVisible(true);
    }
}
